//
//  ViewController.swift
//  SQSwiftSegument
//
//  Created by taojianz on 2017/8/8.
//  Copyright © 2017年 taojianz. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        navigationController?.navigationBar.barTintColor = .red
        
        let frame = CGRect(x: 0, y: 0, width: 200, height: 30)
        let titles = ["书籍","影视","音乐","购物"]
        let segmentControl = SQSwiftSegment(frame, With:titles)
        segmentControl.selectedBtnIndex = 0
        segmentControl.borderColor = UIColor.lightGray.cgColor
        segmentControl.borderWidth = 3
        segmentControl.textHighLightColor = .black
        segmentControl.textNormalColor = .yellow
        segmentControl.font = UIFont.systemFont(ofSize: 13)
        segmentControl.sliderColor = .blue
        segmentControl.cornerRaidus = 0
        segmentControl.sliderCornerRadius = 0
        
        navigationItem.titleView = segmentControl
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

